package org.travel.api.travel.controller.Chao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.travel.api.travel.dao.Chao.XinXiDao;
import org.travel.api.travel.pojo.Flightsxinxi;

@Controller
@RequestMapping("/XinXi")
@CrossOrigin("*")
public class XinXiController {


    @Autowired
    private XinXiDao xinXiDao;

    @RequestMapping("/ById")
    @ResponseBody
    public Flightsxinxi getById(Integer id){

        Flightsxinxi flightsxinxi = xinXiDao.getByFlightsId(id);

        return  flightsxinxi;
    }
}
